// --------------------------------------------------------------------------------------------------------------------- 
// <copyright file="DialectEnum.cs" company="">
//   
// </copyright>
// <summary>
//   Defines the DialectKeyDriverTypeCollection type.
// </summary>
// ---------------------------------------------------------------------------------------------------------------------

using System.ComponentModel;

namespace Ornament.NHibernates.Configurations
{
    /// <summary>
    /// Driver type.
    /// </summary>
    [DataObject]
    public class DataBaseType
    {
        /// <summary>
        /// Gets all driver types that Nhibernate includes;
        /// </summary>
        /// <returns>
        /// DataBase Type  NHibernate suggestion.
        /// </returns>
        public static DialectKeyDriverTypeCollection SupportDataBaseTypes
        {
            get
            {
                return new DialectKeyDriverTypeCollection
                           {
                               new DataBaseType
                                   {
                                       DataBaseName = "DB2",
                                       Dialect = "NHibernate.Dialect.DB2Dialect",
                                       SuggestionDriverClass = new[] {"NHibernate.Driver.DB2Driver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "DB2 for iSeries (OS/400)",
                                       Dialect = "NHibernate.Dialect.DB2400Dialect",
                                       SuggestionDriverClass = new[] {"NHibernate.Driver.DB2400Driver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "Microsoft SQL Server 2000",
                                       Dialect = "NHibernate.Dialect.MsSql2000Dialect",
                                       SuggestionDriverClass = new[] {"NHibernate.Driver.SqlClientDriver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "Microsoft SQL Server 2005",
                                       Dialect = "NHibernate.Dialect.MsSql2005Dialect",
                                       SuggestionDriverClass = new[] {"NHibernate.Driver.SqlClientDriver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "Microsoft SQL Server 2005 Everywhere Edition",
                                       Dialect = "NHibernate.Dialect.MsSqlCeDialect",
                                       SuggestionDriverClass =
                                           new[]
                                               {
                                                   "NHibernate.Driver.SqlClientDriver",
                                                   "NHibernate.Driver.SqlClientDriver"
                                               }
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "Oracle",
                                       Dialect = "NHibernate.Dialect.Oracle8iDialect",
                                       SuggestionDriverClass =
                                           new[]
                                               {
                                                   "NHibernate.Driver.OracleClientDriver",
                                                   "NHibernate.Driver.OracleDataClientDriver"
                                               }
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "Oracle 9",
                                       Dialect = "NHibernate.Dialect.Oracle9iDialect",
                                       SuggestionDriverClass =
                                           new[]
                                               {
                                                   "NHibernate.Driver.OracleClientDriver",
                                                   "NHibernate.Driver.OracleDataClientDriver"
                                               }
                                   },
                                     new DataBaseType
                                   {
                                       DataBaseName = "Oracle 10g",
                                       Dialect = "NHibernate.Dialect.Oracle10gDialect",
                                       SuggestionDriverClass =
                                           new[]
                                               {
                                                   "NHibernate.Driver.OracleClientDriver",
                                                   "NHibernate.Driver.OracleDataClientDriver"
                                               }
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "SQLite",
                                       Dialect = "NHibernate.Dialect.SQLiteDialect",
                                       SuggestionDriverClass =
                                           new[] {"NHibernate.Driver.SQLite20Driver", "NHibernate.Driver.SQLiteDriver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "PostgreSQL",
                                       Dialect = "NHibernate.Dialect.PostgreSQLDialect",
                                       SuggestionDriverClass = new[] {"NHibernate.Driver.NpgsqlDriver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "PostgreSQL 8.1",
                                       Dialect = "NHibernate.Dialect.PostgreSQL81Dialect",
                                       SuggestionDriverClass = new[] {"NHibernate.Driver.NpgsqlDriver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "PostgreSQL 8.2",
                                       Dialect = "NHibernate.Dialect.PostgreSQL82Dialect",
                                       SuggestionDriverClass = new[] {"NHibernate.Driver.NpgsqlDriver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "MySQL 3 or 4",
                                       Dialect = "NHibernate.Dialect.MySQLDialect",
                                       SuggestionDriverClass = new[] {"MySqlDataDriver"}
                                   },
                               new DataBaseType
                                   {
                                       DataBaseName = "MySQL 5",
                                       Dialect = "NHibernate.Dialect.MySQL5Dialect",
                                       SuggestionDriverClass = new[] {"MySqlDataDriver"}
                                   }
                           };
            }
        }

        /// <summary>
        /// Gets database name 
        /// </summary>
        public string DataBaseName { get; private set; }

        /// <summary>
        /// Gets dialectName
        /// </summary>
        public string Dialect { get; private set; }

        /// <summary>
        /// Gets SuggestionDriverClass.
        /// </summary>
        /// <value>
        /// The suggestion driver class.
        /// </value>
        public string[] SuggestionDriverClass { get; private set; }
    }
}